package cate.common.table.item;

import cate.common.table.ESheet;
import easy.java.dev.note.NoteClass;

@NoteClass(value = "升星道具")
public class StarUpItemSheet extends ESheet<StarUpItemRow> {

    @Override
    public String getSheetName() {
        return "升星道具";
    }

    public int getItemId(int star, int camp) {
        for (StarUpItemRow row : this.getList()) {
            if (row.camps.size() == 1 && row.camps.contains((byte)camp) && row.star == star) {
                return row.itemId;
            }
        }
        return -1;
    }
    public StarUpItemRow getItemRow(int star, int camp) {
        for (StarUpItemRow row : this.getList()) {
            if (row.camps.size() == 1 && row.camps.contains((byte)camp) && row.star == star) {
                return row;
            }
        }
        return null;
    }
}
